.class Lcom/hyphenate/chat/EMChatService$1;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field final synthetic this$0:Lcom/hyphenate/chat/EMChatService;

.field final synthetic val$intent:Landroid/content/Intent;

.field final synthetic val$serviceName:Ljava/lang/String;


# direct methods
.method constructor <init>(Lcom/hyphenate/chat/EMChatService;Landroid/content/Intent;Ljava/lang/String;)V
    .locals 0

    iput-object p1, p0, Lcom/hyphenate/chat/EMChatService$1;->this$0:Lcom/hyphenate/chat/EMChatService;

    iput-object p2, p0, Lcom/hyphenate/chat/EMChatService$1;->val$intent:Landroid/content/Intent;

    iput-object p3, p0, Lcom/hyphenate/chat/EMChatService$1;->val$serviceName:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 5

    :try_start_0
    const-string/jumbo v0, ""

    iget-object v1, p0, Lcom/hyphenate/chat/EMChatService$1;->val$intent:Landroid/content/Intent;

    const-string/jumbo v2, "reason"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    iget-object v0, p0, Lcom/hyphenate/chat/EMChatService$1;->val$intent:Landroid/content/Intent;

    const-string/jumbo v1, "reason"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :cond_0
    invoke-static {}, Lcom/hyphenate/chat/EMMonitor;->getInstance()Lcom/hyphenate/chat/EMMonitor;

    move-result-object v1

    iget-object v2, p0, Lcom/hyphenate/chat/EMChatService$1;->this$0:Lcom/hyphenate/chat/EMChatService;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v4, p0, Lcom/hyphenate/chat/EMChatService$1;->this$0:Lcom/hyphenate/chat/EMChatService;

    invoke-virtual {v4}, Lcom/hyphenate/chat/EMChatService;->getPackageName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, "/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, p0, Lcom/hyphenate/chat/EMChatService$1;->val$serviceName:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Lcom/hyphenate/chat/EMMonitor;->start(Landroid/content/Context;Ljava/lang/String;)V

    invoke-static {}, Lcom/hyphenate/chat/EMMonitor;->getInstance()Lcom/hyphenate/chat/EMMonitor;

    move-result-object v1

    iget-object v2, p0, Lcom/hyphenate/chat/EMChatService$1;->this$0:Lcom/hyphenate/chat/EMChatService;

    invoke-virtual {v1, v2, v0}, Lcom/hyphenate/chat/EMMonitor;->startWakeup(Landroid/content/Context;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method
